import React, { ReactNode } from 'react';

export type SfwHideControlContainerProps = {
  /**
   * 隐藏
   */
  hidden: boolean;
  hiddenNode?: ReactNode;
  /**
   * 子元素
   */
  children: React.ReactNode | React.ReactNode[];
};

const SfwHideControlContainer: React.FC<SfwHideControlContainerProps> = (
  props,
) => {
  const { hidden, hiddenNode, children } = props;

  return <>{hidden ? hiddenNode : children}</>;
};

export default SfwHideControlContainer;
